home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1998-01-16 | 19.3 KB | 736 lines |
- '15.06.94
- ' THE TIMES-TABLES
- ' ~~~~~~~~~~~~~~~~~
- '
- ' By
-
- ' Paul Bartlett
- ' ~~~~~~~~~~~~~
-
- 'About the Program
- '~~~~~~~~~~~~~~~~~
- 'This program is very simple to use. When the title screen appears, click on
- 'a 'Box' for the required TIMESTABLE??.
- 'The screen will then contain the selected TIMESTABLE??. Click on a 'Box' to
- 'complete each multiplication until all sums have been correctly answered.
- 'You are then returned to the title screen to start the above again.
- 'There are 10 random settings for the positioning of the 'Boxes'. I put these
- 'random positions in as my children began relying on the actual position of
- 'the 'Boxes' and not the answers they contained. Anyway, feel free to add to
- 'these, or even insert your own random routine.
-
- 'Throughout the program I have put notes so anyone can learn from or find
- 'amusement at the code.
- 'Before reading any notes, I suggest you run the program first to see what
- 'actually happens.
-
- '----------------------------------------------------------------------------
- 'Open up the screen etc.
- '----------------------------------------------------------------------------
- Screen Open 0,640,256,16,Hires
- Dim A$(12)
- Limit Mouse 360,75 To 428,257
- Sam Bank 5
- Global B1,B2,B3,B4,B5,RB,Y,X1,X2,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,WB$,ANSWER,A$()
- CB$="Click A Box to Complete Sum"
- WB$="Wrong Box - Try Again"
-
- '----------------------------------------------------------------------------
- 'Lets unpack the title screen and place the 'WHICH TIMESTABLE??' Zones.
- '----------------------------------------------------------------------------
- SELECTION:
- Unpack 6 To 0 : Paper 0
- Sam Play 4
- Reserve Zone 12
- A$(1)=" 2 "
- A$(2)=" 3 "
- A$(3)=" 4 "
- A$(4)=" 5 "
- A$(5)=" 6 "
- A$(6)=" 7 "
- A$(7)=" 8 "
- A$(8)=" 9 "
- A$(9)=" 1O "
- A$(10)=" 11 "
- A$(11)=" 12 "
-
- '----------------------------------------------------------------------------
- 'Lets give a 'Quit' option by tying up the Esc.Key on the title screen and
- 'place the 'Boxes' to select the required TIMESTABLE??
- '----------------------------------------------------------------------------
- Repeat
- If Key State(69) Then Goto _RETURN_TO_EDITSCREEN
-
- Pen 2
- Locate 62,5 : Print Border$(Zone$(A$(1),1),3)
- Locate 68,7 : Print Border$(Zone$(A$(2),2),3)
- Locate 62,9 : Print Border$(Zone$(A$(3),3),3)
- Locate 68,11 : Print Border$(Zone$(A$(4),4),3)
- Locate 62,13 : Print Border$(Zone$(A$(5),5),3)
- Locate 68,15 : Print Border$(Zone$(A$(6),6),3)
- Locate 62,17 : Print Border$(Zone$(A$(7),7),3)
- Locate 68,19 : Print Border$(Zone$(A$(8),8),3)
- Locate 62,21 : Print Border$(Zone$(A$(9),9),3)
- Locate 68,23 : Print Border$(Zone$(A$(10),10),3)
- Locate 62,25 : Print Border$(Zone$(A$(11),11),3)
-
- '----------------------------------------------------------------------------
- 'On SELECTION of Zone, Goto the requested TIMESTABLE??
- '----------------------------------------------------------------------------
- M=Mouse Zone
- If Mouse Key and M=1 Then Sam Play 1 : Goto TIMESTABLE2
- If Mouse Key and M=2 Then Sam Play 1 : Goto TIMESTABLE3
- If Mouse Key and M=3 Then Sam Play 1 : Goto TIMESTABLE4
- If Mouse Key and M=4 Then Sam Play 1 : Goto TIMESTABLE5
- If Mouse Key and M=5 Then Sam Play 1 : Goto TIMESTABLE6
- If Mouse Key and M=6 Then Sam Play 1 : Goto TIMESTABLE7
- If Mouse Key and M=7 Then Sam Play 1 : Goto TIMESTABLE8
- If Mouse Key and M=8 Then Sam Play 1 : Goto TIMESTABLE9
- If Mouse Key and M=9 Then Sam Play 1 : Goto TIMESTABLE10
- If Mouse Key and M=10 Then Sam Play 1 : Goto TIMESTABLE11
- If Mouse Key and M=11 Then Sam Play 1 : Goto TIMESTABLE12
- Until Mouse Key and M>12
-
-
- '*************************** TIMESTABLE????? ********************************
-
- '----------------------------------------------------------------------------
- 'When entering TIMESTABLE??, we are sent to a procedure holding the
- 'variables that decide which set of Bobs are to be displayed.
- '_GIRLBOB (TIMESTABLE 2,4,6,8,10,12) will display the little girl Bobs, and
- '_BOYBOB (TIMESTABLE 1,3,5,7,9,11) will display the little boy Bobs.
-
- 'P = the pen colour of the answer 'Boxes'.
-
- 'C$ = When we jump to the TIMES_TABLE label, this tells us which number
- ' is being multiplied. ie 1 x C$ =
- ' 2 x C$ = and so on.
-
- 'A$(1) to A$(12) are the answers to each multiplication.
-
- '_XYBOX_POSITION gives the coordinates of the 'Boxes' which hold the answers.
-
- 'Therefore, we now know which Bobs we are going to use, which colour
- 'the 'Boxes' are going to be, the number of TIMESTABLE?? we have selected,
- 'the answers for that TIMESTABLE??, and also the position our answers are to
- 'be displayed in.
- 'Its now time to Goto 'CLASSROOM' where we answer the sums.
- '----------------------------------------------------------------------------
- TIMESTABLE2:
- _GIRLBOB
- P=14
- C$="2"
- A$(1)=" 2 "
- A$(2)=" 4 "
- A$(3)=" 6 "
- A$(4)=" 8 "
- A$(5)=" 1O "
- A$(6)=" 12 "
- A$(7)=" 14 "
- A$(8)=" 16 "
- A$(9)=" 18 "
- A$(10)=" 2O "
- A$(11)=" 22 "
- A$(12)=" 24 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE3:
- _BOYBOB
- P=6
- C$="3"
- A$(1)=" 3 "
- A$(2)=" 6 "
- A$(3)=" 9 "
- A$(4)=" 12 "
- A$(5)=" 15 "
- A$(6)=" 18 "
- A$(7)=" 21 "
- A$(8)=" 24 "
- A$(9)=" 27 "
- A$(10)=" 3O "
- A$(11)=" 33 "
- A$(12)=" 36 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE4:
- _GIRLBOB
- P=14
- C$="4"
- A$(1)=" 4 "
- A$(2)=" 8 "
- A$(3)=" 12 "
- A$(4)=" 16 "
- A$(5)=" 2O "
- A$(6)=" 24 "
- A$(7)=" 28 "
- A$(8)=" 32 "
- A$(9)=" 36 "
- A$(10)=" 4O "
- A$(11)=" 44 "
- A$(12)=" 48 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE5:
- _BOYBOB
- P=6
- C$="5"
- A$(1)=" 5 "
- A$(2)=" 1O "
- A$(3)=" 15 "
- A$(4)=" 2O "
- A$(5)=" 25 "
- A$(6)=" 3O "
- A$(7)=" 35 "
- A$(8)=" 4O "
- A$(9)=" 45 "
- A$(10)=" 5O "
- A$(11)=" 55 "
- A$(12)=" 6O "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE6:
- _GIRLBOB
- P=14
- C$="6"
- A$(1)=" 6 "
- A$(2)=" 12 "
- A$(3)=" 18 "
- A$(4)=" 24 "
- A$(5)=" 3O "
- A$(6)=" 36 "
- A$(7)=" 42 "
- A$(8)=" 48 "
- A$(9)=" 54 "
- A$(10)=" 6O "
- A$(11)=" 66 "
- A$(12)=" 72 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE7:
- _BOYBOB
- P=6
- C$="7"
- A$(1)=" 7 "
- A$(2)=" 14 "
- A$(3)=" 21 "
- A$(4)=" 28 "
- A$(5)=" 35 "
- A$(6)=" 42 "
- A$(7)=" 49 "
- A$(8)=" 56 "
- A$(9)=" 63 "
- A$(10)=" 7O "
- A$(11)=" 77 "
- A$(12)=" 84 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE8:
- _GIRLBOB
- P=14
- C$="8"
- A$(1)=" 8 "
- A$(2)=" 16 "
- A$(3)=" 24 "
- A$(4)=" 32 "
- A$(5)=" 4O "
- A$(6)=" 48 "
- A$(7)=" 56 "
- A$(8)=" 64 "
- A$(9)=" 72 "
- A$(10)=" 8O "
- A$(11)=" 88 "
- A$(12)=" 96 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE9:
- _BOYBOB
- P=6
- C$="9"
- A$(1)=" 9 "
- A$(2)=" 18 "
- A$(3)=" 27 "
- A$(4)=" 36 "
- A$(5)=" 45 "
- A$(6)=" 54 "
- A$(7)=" 63 "
- A$(8)=" 72 "
- A$(9)=" 81 "
- A$(10)=" 90 "
- A$(11)=" 99 "
- A$(12)="1O8 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE10:
- _GIRLBOB
- P=14
- C$="10"
- A$(1)=" 1O "
- A$(2)=" 2O "
- A$(3)=" 3O "
- A$(4)=" 4O "
- A$(5)=" 5O "
- A$(6)=" 6O "
- A$(7)=" 7O "
- A$(8)=" 80 "
- A$(9)=" 9O "
- A$(10)="1OO "
- A$(11)="11O "
- A$(12)="12O "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE11:
- _BOYBOB
- P=6
- C$="11"
- A$(1)=" 11 "
- A$(2)=" 22 "
- A$(3)=" 33 "
- A$(4)=" 44 "
- A$(5)=" 55 "
- A$(6)=" 66 "
- A$(7)=" 77 "
- A$(8)=" 88 "
- A$(9)=" 99 "
- A$(10)="11O "
- A$(11)="121 "
- A$(12)="132 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- TIMESTABLE12:
- _GIRLBOB
- P=14
- C$="12"
- A$(1)=" 12 "
- A$(2)=" 24 "
- A$(3)=" 36 "
- A$(4)=" 48 "
- A$(5)=" 6O "
- A$(6)=" 72 "
- A$(7)=" 84 "
- A$(8)=" 96 "
- A$(9)="1O8 "
- A$(10)="12O "
- A$(11)="132 "
- A$(12)="144 "
- _XYBOX_POSITION
- Goto CLASSROOM
-
- '***************************** Times Table ********************************
-
- CLASSROOM:
- '----------------------------------------------------------------------------
- 'Draw the grid
- '----------------------------------------------------------------------------
- Ink 7
- Box 210,26 To 435,218
- Draw 210,42 To 435,42
- Draw 210,58 To 435,58
- Draw 210,74 To 435,74
- Draw 210,90 To 435,90
- Draw 210,106 To 435,106
- Draw 210,122 To 435,122
- Draw 210,138 To 435,138
- Draw 210,154 To 435,154
- Draw 210,170 To 435,170
- Draw 210,186 To 435,186
- Draw 210,202 To 435,202
- Draw 405,26 To 405,218
-
- '----------------------------------------------------------------------------
- 'Print the selected TIMESTABLE??
- '----------------------------------------------------------------------------
- Pen 2
- Locate 31,4 : Print "1) 1 x "+C$+" ="
- Locate 31,6 : Print "2) 2 x "+C$+" ="
- Locate 31,8 : Print "3) 3 x "+C$+" ="
- Locate 31,10 : Print "4) 4 x "+C$+" ="
- Locate 31,12 : Print "5) 5 x "+C$+" ="
- Locate 31,14 : Print "6) 6 x "+C$+" ="
- Locate 31,16 : Print "7) 7 x "+C$+" ="
- Locate 31,18 : Print "8) 8 x "+C$+" ="
- Locate 31,20 : Print "9) 9 x "+C$+" ="
- Locate 31,22 : Print "10) 10 x "+C$+" ="
- Locate 31,24 : Print "11) 11 x "+C$+" ="
- Locate 31,26 : Print "12) 12 x "+C$+" ="
-
- Paste Bob 30,50,B1
-
- '----------------------------------------------------------------------------
- 'Print the 'Boxes' with the answers from the selected TIMESTABLE??.
- '----------------------------------------------------------------------------
- Pen P
- Locate X1,Y1 : Print Border$(Zone$(A$(1),1),3)
- Locate X2,Y7 : Print Border$(Zone$(A$(2),2),3)
- Locate X1,Y2 : Print Border$(Zone$(A$(3),3),3)
- Locate X2,Y8 : Print Border$(Zone$(A$(4),4),3)
- Locate X1,Y3 : Print Border$(Zone$(A$(5),5),3)
- Locate X2,Y9 : Print Border$(Zone$(A$(6),6),3)
- Locate X1,Y4 : Print Border$(Zone$(A$(7),7),3)
- Locate X2,Y10 : Print Border$(Zone$(A$(8),8),3)
- Locate X1,Y5 : Print Border$(Zone$(A$(9),9),3)
- Locate X2,Y11 : Print Border$(Zone$(A$(10),10),3)
- Locate X1,Y6 : Print Border$(Zone$(A$(11),11),3)
- Locate X2,Y12 : Print Border$(Zone$(A$(12),12),3)
-
- '----------------------------------------------------------------------------
- 'This is where we answer the sums.
- 'Centre CB$ -Click a Box to Complete Sum +"Sum Number"-
- 'If the correct 'Box' is chosen then remove the number in the Box and visit
- 'the procedure called _CORRECTBOB. We then goto the next sum...
- '..ie TIMES1: to TIMES2: etc.
-
- 'If the wrong 'Box' is chosen then visit the procedure called _CROSSBOB.
- 'Goto the start of this sum again until the correct Box is chosen.
- 'Note...See the Procs for details of what they do.
- '----------------------------------------------------------------------------
- TIMES1:
- Pen 5 : Locate ,2 : Centre CB$+" 1"
- M=Mouse Zone : Y=4 : ANSWER=1
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>1 Then Sam Play 3 : _CROSSBOB
- If M=1 Then Sam Play 2 : Locate X1,Y1 : Print " " : Else Goto TIMES1
- _CORRECTBOB
- Goto TIMES2
-
- TIMES2:
- Pen 5 : Locate ,2 : Centre CB$+" 2"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>2 Then Sam Play 3 : _CROSSBOB
- If M=2 Then Sam Play 2 : Locate X2,Y7 : Print " " : Else Goto TIMES2
- _CORRECTBOB
- Goto TIMES3
-
- TIMES3:
- Pen 5 : Locate ,2 : Centre CB$+" 3"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>3 Then Sam Play 3 : _CROSSBOB
- If M=3 Then Sam Play 2 : Locate X1,Y2 : Print " " Else Goto TIMES3
- _CORRECTBOB
- Goto TIMES4
-
- TIMES4:
- Pen 5 : Locate ,2 : Centre CB$+" 4"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>4 Then Sam Play 3 : _CROSSBOB
- If M=4 Then Sam Play 2 : Locate X2,Y8 : Print " " : Else Goto TIMES4
- _CORRECTBOB
- Goto TIMES5
-
- TIMES5:
- Pen 5 : Locate ,2 : Centre CB$+" 5"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>5 Then Sam Play 3 : _CROSSBOB
- If M=5 Then Sam Play 2 : Locate X1,Y3 : Print " " : Else Goto TIMES5
- _CORRECTBOB
- Goto TIMES6
-
- TIMES6:
- Pen 5 : Locate ,2 : Centre CB$+" 6"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>6 Then Sam Play 3 : _CROSSBOB
- If M=6 Then Sam Play 2 : Locate X2,Y9 : Print " " : Else Goto TIMES6
- _CORRECTBOB
- Goto TIMES7
-
- TIMES7:
- Pen 5 : Locate ,2 : Centre CB$+" 7"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>7 Then Sam Play 3 : _CROSSBOB
- If M=7 Then Sam Play 2 : Locate X1,Y4 : Print " " : Else Goto TIMES7
- _CORRECTBOB
- Goto TIMES8
-
- TIMES8:
- Pen 5 : Locate ,2 : Centre CB$+" 8"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>8 Then Sam Play 3 : _CROSSBOB
- If M=8 Then Sam Play 2 : Locate X2,Y10 : Print " " : Else Goto TIMES8
- _CORRECTBOB
- Goto TIMES9
-
- TIMES9:
- Pen 5 : Locate ,2 : Centre CB$+" 9"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>9 Then Sam Play 3 : _CROSSBOB
- If M=9 Then Sam Play 2 : Locate X1,Y5 : Print " " : Else Goto TIMES9
- _CORRECTBOB
- Goto TIMES10
-
- TIMES10:
- Pen 5 : Locate ,2 : Centre CB$+"10"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>10 Then Sam Play 3 : _CROSSBOB
- If M=10 Then Sam Play 2 : Locate X2,Y11 : Print " " : Else Goto TIMES10
- _CORRECTBOB
- Goto TIMES11
-
- TIMES11:
- Pen 5 : Locate ,2 : Centre CB$+"11"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M>11 Then Sam Play 3 : _CROSSBOB
- If M=11 Then Sam Play 2 : Locate X1,Y6 : Print " " Else Goto TIMES11
- _CORRECTBOB
- Goto TIMES12
-
- TIMES12:
- Pen 5 : Locate ,2 : Centre CB$+"12"
- M=Mouse Zone
- Repeat
- K$=Inkey$
- Clear Key
- If Lower$(K$)="q" or Asc(K$)=27
- Goto SELECTION
- End If
- Wait 1
- Until Mouse Key
- If M=12 Then Sam Play 2 : Locate X2,Y12 : Print " " : Else Goto TIMES12
- Locate ,2 : Cline
- _CORRECTBOB12
- Fade 3 : Wait 25 : Track Stop : Show On
- Goto SELECTION
-
- '**************************** The Procedures ********************************
-
- '----------------------------------------------------------------------------
- 'These two Procedures designate which Bobs from the Bob bank are assigned to
- 'the variables B1 to B5.
- ' ie. In _GIRLBOB, Bob 8 from the Bob bank is assigned to
- ' the variable B3, whereas in _BOYBOB the variable B3=3
- 'Cls clears the title screen.
- '----------------------------------------------------------------------------
- Procedure _BOYBOB
- Cls : Wait 50
- B1=1 : B2=2 : B3=3 : B4=4 : B5=5
- End Proc
-
- Procedure _GIRLBOB
- Cls : Wait 50
- B1=6 : B2=7 : B3=8 : B4=9 : B5=10
- End Proc
-
- '----------------------------------------------------------------------------
- 'This Proc is used when we have clicked on the wrong 'Box' in TIMES1: to
- 'TIMES12:
- 'We clear the line that reads "Click A Box to Complete Sum + "Sum number",
- 'and print WB$-"Wrong Box - Try Again" on the same line.
- 'We then return to the question again, hopefully to get it correct so we
- 'can go to the next Procedure.
- '----------------------------------------------------------------------------
- Procedure _CROSSBOB
- Locate ,2 : Cline : Pen 4 : Centre WB$
- Paste Bob 30,50,B3 : Wait 50 : Paste Bob 30,50,B1
- End Proc
-
- '----------------------------------------------------------------------------
- 'This Proc is used when we have clicked on the correct 'Box'in TIMES1: to
- 'TIMES12:
- 'In TIMES1: we set the value of both Y + ANSWER (Y=4 and ANSWER=1)
- 'Therefore, on its first call Y=4.
- 'On its next call Y will =6, as after the first call Y will equal Y(4) + 2.
- 'On its next call Y will =8, etc.etc.
- 'ANSWER will be the same as Y, except its value will only be raised by 1 each
- 'time this Procedure is entered.
- '----------------------------------------------------------------------------
- Procedure _CORRECTBOB
- Locate 46,Y : Pen 15 : Print A$(ANSWER)
- Paste Bob 30,50,B2 : Wait 50 : Paste Bob 30,50,B1
- Y=Y+2
- ANSWER=ANSWER+1
- End Proc
-
- '----------------------------------------------------------------------------
- 'When sum 12 is correct we arrive from TIMES12: to this procedure.
- 'Print the answer, hide the mouse pointer then draw a 'Tick' in the first
- 'little box at the side of the grid using the Polygon command.
- 'The tick is then grabbed and stamped down in the other boxes at a space of
- 'TY(16pixels).
- 'Remove the empty 'Boxes' by placing a Bar over the top of them.
- 'Start the tracker module and 'Loop' it so it plays over and over again.
- 'Form a loop to wait for the right mouse button to be pressed.
- 'When the right mouse button is pressed, return to TIMES12: fade out screen 0,
- 'stop the tracker module, re-show mouse pointer and goto SELECTION: to choose
- 'next TIMESTABLE??.
- '----------------------------------------------------------------------------
- Procedure _CORRECTBOB12
- Locate 46,Y : Pen 15 : Print A$(12)
- Hide
- Paste Bob 30,50,B2 : Wait 50 : Paste Bob 30,50,B4
- Ink 4
- Polygon 410,36 To 418,39 To 431,27 To 415,38 To 411,36 : Sam Play 5
- Get Bob 11,406,28 To 434,42 : Wait 15
- TY=44
- For TB=1 To 11
- Paste Bob 406,TY,11
- Sam Play 5 : Wait 15
- TY=TY+16
- Next TB
- Sam Play 4
- Paste Bob 30,50,B5
- Ink 0 : Bar 473,33 To 590,214
- Locate ,2 : Pen 15 : Centre "Well Done!"
- Locate ,28 : Cline : Centre "Well Done!"
- Pen 5 : Locate 62,12 : Print "Please Press"
- Locate 59,14 : Print "A Mouse Button"
- Locate 61,16 : Print "to Select next"
- Locate 62,18 : Print "TIMES TABLE"
- Wait 25
- Track Play 7
- Track Loop On
- Do
- If Mouse Key Then Pop Proc
- Loop
- End Proc
-
- '----------------------------------------------------------------------------
- 'This Proc Selects a random number between 0 and 9 and assigns the variables
- 'Y1 to Y12.
- 'X1 and X2 are the left and right hand sides to which the 'Boxes' shall be
- 'placed.
- 'On the random number being selected, we are taken to the appropriate
- '_POSITION?? and the Y Position of the 'Boxes' are assigned.
- 'There 10 random positions available.
- '----------------------------------------------------------------------------
- Procedure _XYBOX_POSITION
-
- RB=Rnd(9)
- If RB=0 : X1=60 : X2=69 : Goto _POSITION1 : End If
- If RB=1 : X1=69 : X2=60 : Goto _POSITION1 : End If
- If RB=2 : X1=60 : X2=69 : Goto _POSITION2 : End If
- If RB=3 : X1=69 : X2=60 : Goto _POSITION2 : End If
- If RB=4 : X1=60 : X2=69 : Goto _POSITION3 : End If
- If RB=5 : X1=69 : X2=60 : Goto _POSITION3 : End If
- If RB=6 : X1=60 : X2=69 : Goto _POSITION4 : End If
- If RB=7 : X1=69 : X2=60 : Goto _POSITION4 : End If
- If RB=8 : X1=60 : X2=69 : Goto _POSITION5 : End If
- If RB=9 : X1=69 : X2=60 : Goto _POSITION5 : End If
-
- _POSITION1:
- Y1=13 : Y2=5 : Y3=9 : Y4=21 : Y5=17 : Y6=25
- Y7=21 : Y8=25 : Y9=5 : Y10=13 : Y11=9 : Y12=17
- Pop Proc
-
- _POSITION2:
- Y1=13 : Y2=5 : Y3=25 : Y4=21 : Y5=17 : Y6=9
- Y7=21 : Y8=25 : Y9=17 : Y10=13 : Y11=9 : Y12=5
- Pop Proc
-
- _POSITION3:
- Y1=5 : Y2=25 : Y3=13 : Y4=9 : Y5=17 : Y6=21
- Y7=13 : Y8=17 : Y9=21 : Y10=5 : Y11=25 : Y12=9
- Pop Proc
-
- _POSITION4:
- Y1=25 : Y2=9 : Y3=5 : Y4=21 : Y5=17 : Y6=13
- Y7=21 : Y8=25 : Y9=13 : Y10=9 : Y11=5 : Y12=17
- Pop Proc
-
- _POSITION5:
- Y1=5 : Y2=17 : Y3=25 : Y4=13 : Y5=21 : Y6=9
- Y7=25 : Y8=13 : Y9=9 : Y10=5 : Y11=17 : Y12=21
- Pop Proc
- End Proc
-
- '----------------------------------------------------------------------------
- 'If Esc. key is pressed at title screen then we jump to this label and
- 'return to the End.
- '----------------------------------------------------------------------------
- _RETURN_TO_EDITSCREEN:
- End
- 'Above line changed by Conor Kerr 1998